<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateInvitationActivitiesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('invitation_activities', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->integer('agent_id')->comment('代理商id');
            $table->string('name', 256)->comment('活动名称');
            $table->integer('ranking_num')->comment('榜单展示数量');
            $table->string('img_url', 256)->comment('活动海报地址');
            $table->dateTime('start_time')->comment('活动开始时间');
            $table->dateTime('end_time')->comment('活动结束时间');
            $table->string('status', 16)->default(\App\Enums\AvailableStatus::ENABLED)->comment('活动状态');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('invitation_activities');
    }
}
